Skip to content

fix(widget): permit null in validator provider revshare decoding - #570

Closed
petar-omni wants to merge 3 commits into
refactor/shared-skeleton-layoutsfrom
fix/validator-provider-revshare-decode
Closed

petar-omni wants to merge 3 commits into
refactor/shared-skeleton-layoutsfrom
fix/validator-provider-revshare-decode

Conversation

@petar-omni

@petar-omni petar-omni commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Permit null in ValidatorProviderDto.revshare decoding via an OpenAPI spec patch, regenerated schemas, and regression tests.
  • Update default LegacyApi URL to staging (https://api.stg.stakek.it/docs.yaml) to fix the ALB 404 on production https://api.stakek.it/docs.yaml.
  • Strip _v1 operation ID suffixes emitted by NestJS URI versioning so generated client methods and DTOs retain stable names without V1 suffixes.
  • Explicitly close unannotated OpenAPI object schemas in prepareSpecContents so Effect rc.115 openapigen emits Schema.Struct, preserving .fields access.

Why

Fixes decode failures when validator providers return revshare: null in validator and yield provider responses.

Dependency

Stacked on #568; merge the layout refactor first.


Note

Medium Risk
Touches generated API clients/spec defaults and broad UI loading paths; earn max/gas-token logic changes could affect stake amount behavior when yield data is still loading.

Overview
Updates OpenAPI codegen so legacy and Yield specs strip NestJS _vN operationId suffixes, default the Yield spec to api.yield.xyz, patch ValidatorProviderDto.revshare and TransactionDto.unsignedTransaction for accurate decoding, and set additionalProperties: false on object schemas so Effect openapigen keeps Schema.Struct (.fields) instead of StructWithRest.

Earn/stake behavior adds isNativeToken and relaxes stakeTokenSameAsGasToken when yield metadata is missing; entry/dashboard facades show formatted USD for zero amounts and compute gas-token sameness without requiring a selected yield.

Loading UX replaces large ContentLoaderSquare blocks with layout-matched skeletons across activity, borrow, earn, portfolio, and shared pieces (AmountTokenSection, DetailRow, token triggers, MetaInfoSkeleton, etc.), including borrow position pages that drop separate skeleton files in favor of loading props on the real components.

Earn dashboard charts gain hover tooltips (value + date), flexible chart height, and an optional valueFormatter on history sections.

Regenerated borrow (and related) API clients reflect upstream spec changes (e.g. supplyAndBorrow, safer path params, typed schema fields).

Reviewed by Cursor Bugbot for commit cf34849. Configure here.

@changeset-bot

changeset-bot Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: cf34849

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@petar-omni
petar-omni force-pushed the fix/validator-provider-revshare-decode branch from 4f9311c to 113d3e3 Compare September 16, 2026 09:51
@petar-omni
petar-omni added this pull request to stack #569 September 16, 2026 09:59
@petar-omni
petar-omni force-pushed the fix/validator-provider-revshare-decode branch from 113d3e3 to f8e9e2a Compare September 16, 2026 10:56
@petar-omni
petar-omni force-pushed the fix/validator-provider-revshare-decode branch 2 times, most recently from b8a64ca to 02874d7 Compare September 16, 2026 12:58
@petar-omni
petar-omni force-pushed the fix/validator-provider-revshare-decode branch from 02874d7 to 025fcb2 Compare September 17, 2026 06:04
petar-omni and others added 3 commits September 18, 2026 22:29
* feat(earn): add history chart hover details

Show the nearest recorded value and localized date when hovering either earn history chart.

Highlight the active point and use theme-derived contrast for the tooltip container.

* fix(earn): preserve UTC history dates

Format snapshot dates in UTC so viewers west of UTC do not see the previous calendar day.
Consolidate loading placeholders across widget flows and keep initial
price layouts stable.

Replace loading-time zero values and delayed native-token detection.
This prevents visual shifts and button flashes during initial rendering.

- Align select trigger skeletons with loaded geometry and add CaretDownIcon
  loading support.
- Prevent select provider card unmount flash while multi-yield queries resolve.
- Add strategy details skeleton placeholder above divider under dashboard
  variant.
- Preserve dual-column layout balance for estimated reward amounts during
  loading.
- Add loading accessibility and disabled states to MaxButton.
- Align amount-token-section min/max label alignment with flexbox container.
…enapi generation

- Permit null in ValidatorProviderDto.revshare decoding (OpenAPI spec patch,
  regenerated schemas, and domain regression tests).
- Target production API doc endpoints (api.stakek.it, api.yield.xyz, and
  borrow.yield.xyz) for OpenAPI generation.
- Strip _v1 operation ID suffixes emitted by NestJS URI versioning so client
  methods and DTOs retain stable names.
- Close unannotated OpenAPI object schemas in prepareSpecContents so Effect
  rc.115 generates Schema.Struct preserving .fields access.
- Support "supplyAndBorrow" action and "BUNDLE" transaction types in SKBorrowTxMeta.
- Add blueBundleOriginationFeeBps to borrow test mock fixtures.
@petar-omni
petar-omni force-pushed the fix/validator-provider-revshare-decode branch from 025fcb2 to cf34849 Compare September 21, 2026 08:36
@petar-omni

Copy link
Copy Markdown
Contributor Author

Superseded by a new pull request targeting main directly.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit cf34849. Configure here.

readonly offset: number;
readonly limit: number;
readonly items?: ReadonlyArray<MarketDto>;
readonly items?: never;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Paginated items typed as never

High Severity

Markets, liquidations, and actions list responses now type items as never, and the markets schema decodes items with Schema.Never. Any decode that does not replace that field will reject real items arrays and drop paginated borrow data.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit cf34849. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Risk: medium. Not approved: Cursor Bugbot skipped and left an unresolved high-severity finding on generated borrow pagination types, while Cursor Security Agent passed. Reviewers were assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cursor
cursor Bot requested a review from samuelmattjohnston September 21, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant